//导入封装后的axios
import axios from './request'


//封装接口

//员工登录
function get_login(params = {}) {
    return axios.post('/api/user/login', params);
}
//员工注册
function get_register(params = {}) {
    return axios.post('/api/user/register', params);
}
//角色
function get_role(params = {}) {
    return axios.get('/api/role/list', { params });
}
//出差添加
function get_add(params = {}) {
    return axios.post('/api/business/add', params);
}
//出差删除
function get_delete(params = {}) {
    return axios.post('/api/business/delete', params);
}
//出差导入
function get_import(params = {}) {
    return axios.post('/api/business/import', params);
}
//出差导出
function get_download(params = {}) {
    return axios.get('/api/business/download', { params });
}
//出差查询
function get_list(params = {}) {
    return axios.get('/api/business/list', { params });
}
//外勤查询
function get_outList(params = {}) {
    return axios.get('/api/outside/list', { params })
}
//外勤添加
function get_outAdd(params = {}) {
    return axios.post('/api/outside/add', params)
}
//外勤删除
function get_outDelete(params = {}) {
    return axios.post('/api/outside/delete', params)
}
//外勤导入
function get_outImport(params = {}) {
    return axios.post('/api/outside/import', params)
}
//外勤导出
function get_outDownload(params = {}) {
    return axios.get('/api/outside/download', { params })
}
//请假查询
function get_leaveList(params = {}) {
    return axios.get('/api/leave/list', { params })
}
//请假添加
function get_leaveAdd(params = {}) {
    return axios.post('/api/leave/add', params)
}
//请假删除
function get_leaveDelete(params = {}) {
    return axios.post('/api/leave/delete',  params )
}
//请假导入
function get_leaveImport(params = {}) {
    return axios.post('/api/leave/import',  params )
}
//请假导出
function get_leaveDown(params = {}) {
    return axios.get('/api/leave/download', { params })
}
//加班查询
function get_workList(params = {}) {
    return axios.get('/api/work/list', { params })
}
//加班添加
function get_workAdd(params = {}) {
    return axios.post('/api/work/add', params)
}
//加班删除
function get_workDelete(params = {}) {
    return axios.post('/api/work/delete',  params )
}
//加班导入
function get_workImport(params = {}) {
    return axios.post('/api/work/import',  params )
}
//加班导出
function get_workDown(params = {}) {
    return axios.get('/api/work/download', { params })
}

//导出所有函数
export {
    get_workList,
    get_workAdd,
    get_workDelete,
    get_workImport,
    get_workDown,
    get_leaveList,
    get_leaveAdd,
    get_leaveDelete,
    get_leaveImport,
    get_leaveDown,
    get_outDownload,
    get_outImport,
    get_outDelete,
    get_outAdd,
    get_outList,
    get_login,
    get_register,
    get_role,
    get_add,
    get_delete,
    get_import,
    get_download,
    get_list
}